{% extends "base2.html" %}
{% block title %}Menu_List_Page{% endblock %}
{% block head %}Welcom to {{rest_p.name}}!
		<p>Menu_list:</p>
{% endblock %}
{% block content %}
  {% if user.username %}
    <p>Welcome {{ user.username }}!
      Here you can store and share bookmarks!</p>
  {% else %}
    <p>Welcome anonymous user!
      You need to <a href="/login/">login</a>
      before you can order food.</p>
  {% endif %}
<body>
  		 {% if   menu_item_all_list%}
		  	{% for menu_item in menu_item_all_list %}
			      <p>Name:{{ menu_item.name }}</p>
			      <p>Price:{{menu_item.price}}</p>
			      <p>Description:{{menu_item.discription}}</p>
			      <p>
			  	  <form  action="{% url forfood_menu %}" method="get">
			  	     <input type="text" value=1 name="menu_item_num" id="menu_item_num">
			  	     <input type="hidden" value="{{menu_item.id}}" name="menu_item_id" id="menu_item_id">
			  	     <input type="hidden" value="{{rest_p.id}}" name="rest_id" id="rest_id">
			  	     <input type="submit" value="order">
			  	  </form>
			      </p>
			  	
			  	<hr />
		  	{% endfor %}
		  {% else %}
		  	<p>This restaurant has no menu_item now!</p>
		  {% endif %}

<div id="right">
	<div id="side_bar_34">
	
	{% if order_list %}
		{% for order in order_list %}
			<p>order<p>
			<p></p>
			{% if item_list %}
		  		{% for item in item_list %}
		  		<p>{{ item.name }}</p>
		  		
		  		{% endfor %}
		  	{% else %}
		  		<p>You have not ordered any item for the order!</p>
		  	{% endif %}
		  	<% order.total %>
	  	{% endfor %}
  	{% else %}
	  	<p>Your order is empty!</p>
	{% endif %}
  	</div>
</div>
</body>
{% endblock %}